#define user_detail_layout()
#@layout()
#define css()
#@layout_css?()
<style>
    .nav-stacked > li.active > a {
        color: #fff;
        border-top: 0;
        border-left: 0;
        background: #3c8dbc;
    }

    .nav-stacked > li.active > a:hover {
        background: #3c8dbcc4;
        color: #fff;
        border-top: 0;
        border-left: 0;
    }

    .jp-actiontr {
        word-break: break-all;
    }
</style>
#end

#define script()
#@layout_script?()
<script>

    var action = getPara("action");
    if (action == "") action = "base";

    $("#nav").children().each(function () {
        var li = $(this);
        li.children().attr("href", "?action=" + li.attr("id"));

        if (action == li.attr("id")) {
            li.attr("class", "active");
        } else {
            li.attr("class", "");
        }
    });


    $('#userForm').on('submit', function () {
        ajaxSubmit("#userForm",function () {
            toastr.success('修改成功');
        });
        return false;
    });
</script>
#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            用户资料
            <small>User Profile</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-md-3">

                <!-- Profile Image -->
                <div class="box box-primary">
                    <div class="box-body box-profile">
                        <img class="profile-user-img img-responsive img-circle" src="#(user.avatar ??)">
                        <h3 class="profile-username text-center">#(user.nickname ??)</h3>
                        <p class="text-muted text-center">#(user.identity ??)</p>
                    </div>

                    <div class="box-body no-padding">
                        <ul class="nav nav-pills nav-stacked" style="border-top: 1px solid #eee;" id="nav">
                            <li id="base"><a><i class="fa fa-fw fa-user"></i> 基本资料</a></li>
                            #hasPermission('/admin/user/roleEdit')
                            <li id="role"><a><i class="fa fa-fw fa-group"></i> 角色分配</a></li>
                            #end
                            <li id="communication"><a><i class="fa fa-fw fa-phone-square"></i> 通信资料</a></li>
                            <li id="pwd"><a><i class="fa fa-fw fa-key"></i> 账号密码</a></li>
                            <li id="signature"><a><i class="fa fa-fw fa-bars"></i> 个人签名</a></li>
                            <li id="other"><a><i class="fa fa-fw fa-leaf"></i> 其他属性</a></li>
                            <li id="avatar"><a><i class="fa fa-fw fa-black-tie"></i> 修改头像 </a></li>
                            <li id="utm"><a><i class="fa fa-fw fa-hourglass-half"></i> 行为记录 </a></li>
                        </ul>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->

            </div>
            <!-- /.col -->
            <div class="col-md-9">
                <div class="box box-primary">
                    #@detail?()
                </div>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->

    </section>

</div>
#end
#end
